
#ifndef __LIBERTY_ENGINE_YIELDINSTRUCTION_H__
#define __LIBERTY_ENGINE_YIELDINSTRUCTION_H__

#include <Liberty3D/Liberty3D.h>

#include <Liberty3D/Engine/Object.h>
#include <Liberty3D/Engine/Performance.h>

namespace Liberty { namespace Engine {

    class YieldInstruction {
    public:
        YieldInstruction();
    };

    class WaitForEndOfFrame : YieldInstruction {
    };

    class WaitForFixedUpdate : YieldInstruction {
    };

    class WaitForSeconds : YieldInstruction {
    protected:
        Performance::Counter _delay;

    public:
        WaitForSeconds(Performance::Counter delay);
        WaitForSeconds(double seconds);

    public:
        double seconds() const;

        inline Performance::Counter delay() const { return _delay; }
    };

    class EndOfCoroutine : YieldInstruction {
    };
}}

#endif
